package com.heima.service.impl;

import com.heima.pojo.TbOrder;
import com.heima.mapper.TbOrderMapper;
import com.heima.service.ITbOrderService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.Data;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.time.LocalDateTime;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author AkiRinko
 * @since 2024-06-11
 */
@Service
@RequiredArgsConstructor
public class TbOrderServiceImpl extends ServiceImpl<TbOrderMapper, TbOrder> implements ITbOrderService {

    private final TbOrderMapper tbOrderMapper;

    /**
     * 订单总量
     *
     * @param start
     * @param end
     * @return
     */
    @Override
    public String selectOrderCount(String start, String end) {
        return tbOrderMapper.selectOrderCount(start, end);
    }

    /**
     * 当月销售额
     *
     * @param start
     * @param end
     * @return
     */
    @Override
    public Integer selectOrderAmount(String start, String end) {
        return tbOrderMapper.selectOrderAmount(start, end);
    }
}
